package com.qq.mybatisdemo.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qq.mybatisdemo.bean.User;
import com.qq.mybatisdemo.mapper.TbUserMapper;
import com.qq.mybatisdemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private TbUserMapper tbUserMapper;
    


    @Override
    public PageInfo<User> getPagenationUser() {
        PageHelper.startPage(1, 2);
        List<User> list = tbUserMapper.selectAllUser();
        PageInfo<User> page = new PageInfo<User>(list);
        return page;
    }
}
